/**
 *  async await 是promise语法糖
 **/


function mockRequestData() {
  return new Promise((resolve, reject) => {
    resolve({
      code: 200, data: {
        name: '测试'
      }
    })
  })
}


async function queryData() {
  const {data} = await mockRequestData()
  console.log(data)
}

queryData()